package cn.xrfzh.biz;

import cn.xrfzh.jackson.annotation.EnableJackson;
import lombok.extern.slf4j.Slf4j;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.CommandLineRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;

@Slf4j
@MapperScan(basePackages = {"cn.xrfzh.biz.**.mapper"})
@EnableJackson
@SpringBootApplication
public class BizApplication implements CommandLineRunner {

    @Value("${server.port}")
    private String port;

    @Value("${server.servlet.context-path}")
    private String contextPath;

    public static void main(String[] args) {
        SpringApplication.run(BizApplication.class, args);
    }

    @Override
    public void run(String... args) throws Exception {
        log.warn("在线接口文档地址：http://127.0.0.1:{}{}/doc.html", port, contextPath);
        log.warn("项目地址：http://127.0.0.1:{}{}/index.html", port, contextPath);
    }

}
